package online.cmagic.actionType.chain;

/**
 * @author wsc
 * @date: 2020年04月15日 17:09
 * @since JDK 1.8
 */
public class TestClient {

    public static void main(String[] args) {
        Leader leader1 = getChain();

        LeaveRequest request = new LeaveRequest();
        request.setDeptName("开发部");
        request.setLeaveDays(3);
        request.setName("宇宙级无敌超级大帅哥");
        leader1.process(request);
    }

    private static Leader getChain() {
        Leader leader1=new ProjectManager("张三");
        Leader leader2=new CompanyManager("李四");
        leader1.setNextLeader(leader2);
        return leader1;
    }
}
